home *** CD-ROM | disk | FTP | other *** search
/ SIGGRAPH 2002 Course Notes / SIGGRAPH 2002 - Course Notes - Disc 1.iso / pc / notes / 05 / supplemental_material / RNL_Source / readme.txt < prev    next >
Encoding:
Text File  |  2001-05-07  |  6.8 KB  |  181 lines

  1.  
  2. For errata and updates see http://www.debevec.org/RNL or
  3. http://www.debevec.org/IBL2001
  4.  
  5. This directory contains the original scene files for the animation
  6. "Rendering with Natural Light" shown at the SIGGRAPH 1998 Electronic
  7. Theater in Orlando, Florida.
  8.  
  9. README           This file
  10. angmap.cal       Angular map equation for mapping light probe to environment
  11. anim.vf          Animation camera path viewfile
  12. gensup1.sh       Sphere support stand generator script
  13. gensup1a.sh      Central sphere support stand generator script
  14. marble.hdr       Texture map for the pedestal
  15. optrad           RADIANCE options for rendering the animation
  16. pflare.c         C program for pflare, the HDR image blurring program
  17. rnl_probe.hdr    UC Berkeley Eucalyptus Grove light probe image
  18. rnl_scene.rad    Main scene file for the spheres on the pedestal
  19. texmap0.cal      Texture map equation for mapping marble.hdr onto pedestal
  20.  
  21. "Rendering with Natural Light" was rendered entirely with Image-Based
  22. Lighting captured through High-Dynamic Range Photography in the UC
  23. Berkeley Eucalyptus Grove.
  24.  
  25. To render the animation yourself, follow the following procedure:
  26.  
  27. 1) Copy the files in this directory to a UNIX machine (Linux, IRIX...)
  28.  
  29. 2) Install Greg Ward's "RADIANCE" lighting simulation package from:
  30.    http://radsite.lbl.gov/radiance/
  31.  
  32. 3) View the Light Probe Image to test that Radiance is installed: type
  33.  
  34.    % ximage rnl_probe.hdr
  35.  
  36.    (Note: the "%" signifies the csh shell prompt; don't type it.)
  37.  
  38.    An image display window showing the RNL environment should come up
  39.    if RADIANCE is working.  Hit q in the window when you're done.
  40.  
  41. 4) Create an octree scene file by typing:
  42.  
  43.    % oconv rnl_scene.rad > rnl_scene.oct
  44.  
  45. 5) Render the scene in the interactive renderer:
  46.  
  47.    % rview -vf anim.vf rnl_scene.oct
  48.  
  49.    After a moment, you should obtain a window with a somewhat dark
  50.    rendering of the RNL scene (a collection of spheres on stands on a
  51.    pedestal amongst trees.)  When you're done, type q and then return
  52.    in the window to quit.  The file "anim.vf" contains all the camera
  53.    views for the RNL animation.  The interative renderer simply uses
  54.    the last view in the file.
  55.  
  56. 6) Render the scene in the interactive renderer with global illumination:
  57.  
  58.    % rview -vf anim.vf -ab 1 -aa 0 -ad 256 rnl_scene.oct
  59.  
  60.    This sets one ambient bounce with -ab 1, disables irradiance
  61.    cacheing with -aa 0, and specified 256 ambient divisions (rays that
  62.    fire out looking for light) per pixel.  This rendering will take a
  63.    while to complete.  You can stop it at any time with q <return>.
  64.  
  65. 7) Render the scene in the offline renderer with global illumination:
  66.  
  67.    % rpict -vf anim.vf @optrad rnl_scene.oct > render.hdr
  68.  
  69.    This will take a while; perhaps 20 minutes on an 800MHz Pentium
  70.    III.  You will receive output status lines every 30 seconds:
  71.  
  72.    rpict: 14284948 rays, 56.88% after 0.167u 0.000s 0.167r hours on hostname
  73.  
  74.    Upon completion, you will have a HDR image "render.hdr".  View it
  75.    with:
  76.  
  77.    % ximage render.hdr
  78.  
  79. 8) If you'd like to experiment with blur, glare, and flare, you will
  80.    need to add the source file "pflare.c" to your RADIANCE
  81.    distribution and then recompile RADIANCE to produce the executable
  82.    "pflare".  You'll have to play with the Makefiles a bit, but
  83.    pflare.c should go in the directory ray/src/px/ in the radiance
  84.    source tree.
  85.  
  86.    Once you have pflare compiled and on yor path, type:
  87.  
  88.    % pflare render.hdr -gb 10 > gblur.hdr
  89.    % ximage gblur.hdr
  90.  
  91.    You will see a blurry image of render.hdr; pflare has applied a
  92.    Gaussian Blur of 10 pixels diameter.  Now try:
  93.  
  94.    % pflare render.hdr -cb 10 > cblur.hdr
  95.    % ximage cblur.hdr
  96.  
  97.    This has applied a circular disk blur of 10 pixels; it's a more
  98.    realistic out-of-focus effect.  Now try:
  99.  
  100.    % pflare render.hdr -bb 10 > bblur.hdr
  101.    % ximage bblur.hdr
  102.  
  103.    This applies a box blur; it's very fast but not very
  104.    realistic.  Now try:
  105.  
  106.    % pflare render.hdr -vi 200 400 > vignette.hdr
  107.    % ximage vignette.hdr
  108.    
  109.    This darkens the corners of the image, which helps communicate the
  110.    dynamic range of the since (really bright things will stay bright
  111.    despite the darkening, since they were much brighter than white to
  112.    begin with.)
  113.  
  114.    For efficiency, we can use "-ds" to downsample the image and "-us"
  115.    to upsample it.  This lets us compute large blurs more quickly, but
  116.    requires evenly divisible image dimensions.  We can also use the
  117.    "accumulate" feature to add together several different blurred
  118.    versions of the image to form the final rendering.  Here's the
  119.    process used for the SIGGRAPH animation Rendering with Natural
  120.    Light:
  121.  
  122.    % pflare render.hdr -ds -ds -ds -gb 12 -us -us -us -ac 0.1 -ds -ds
  123.      -ds -gb 40 -us -us -us -ac 0.05 -ds -ds -ds -gb 3 -us -us -us
  124.      -ac 0.1 -gb 1 -ac 0.75 | pflare -sh 0.75 -vi 150 400 > rnl.hdr
  125.    % ximage rnl.hdr
  126.  
  127.    Make sure to type this all as one line.  This also applies a tone
  128.    mapping curve with a soft shoulder beginning at 75% image
  129.    brightness.  You can accomplish much the same effect with the
  130.    hardcoded blur operation "-ha":
  131.  
  132.    % pflare render.hdr -ha | pflare -sh 0.75 -vi 150 400 > rnl.hdr
  133.    % ximage rnl.hdr
  134.  
  135. 9) You can convert the rendered or processed image to a standard low
  136.    dynamic range image format with the following commands:
  137.  
  138.    % ra_tiff render.hdr render.tif
  139.    % ra_ppm render.hdr render.ppm
  140.    % ra_ppm render.hdr | cjpeg -q 90 > render.jpg
  141.  
  142.    These will properly apply a gamma 2.2 curve to the data and then
  143.    map the values zero to one to [0,255].  The last command requires
  144.    that you've also installed the JPEG library.
  145.  
  146. 10) Finally, if you have a lot of processing power available, you can
  147.     render the entire 2622-frame animation with the command:
  148.  
  149.     % mkdir frames
  150.     % rm frames/*.hdr /tmp/ambient.amb
  151.     % cat anim.vf | rpict -S 1 @optrad -o frames/rnl_%04d.hdr rnl_scene.oct
  152.  
  153.     The first few hundred frames will render very quickly since the
  154.     camera is looking toward the sky and sees none of the objects.
  155.     Most of the frames will take considerably longer.  Each saved
  156.     frame may be as large as a megabyte, so disk space may be an issue.
  157.     This command reads in RADIANCE options from the file "optrad", which
  158.     specifies an ambient cache file of /tmp/ambient.amb.
  159.  
  160. 11) Finally, if you want to process all of the frames with the blur
  161.     filter and convert to JPEG images, you can execute:
  162.  
  163.    % cd frames
  164.    % foreach i (*.hdr)
  165.    % echo Processing $i...
  166.    % pflare $i -ha | pflare -sh 0.75 -vi 150 400 | ra_ppm | cjpeg -q 80 > $i:r.jpg
  167.    % end
  168.  
  169. The actual "Rendering with Natural Light" also included a high dynamic
  170. range fade-in at the beginning and fade-out at the end.
  171.  
  172. 12) To learn more about RADIANCE, read the tutorials and manuals at:
  173.     http://radsite.lbl.gov/radiance/
  174.  
  175.  
  176. Paul Debevec April 2001
  177.  
  178. For errata and updates see http://www.debevec.org/RNL or
  179. http://www.debevec.org/IBL2001
  180.  
  181.